import request from '/@/utils/request';
export function DataAreaApi() {
	return {
		create: (data: object) => {
			return request({
				url: 'management/data/area/create',
				method: 'post',
				data,
			});
		},
		update: (data: object) => {
			return request({
				url: 'management/data/area/update',
				method: 'put',
				data,
			});
		},
		view: (id: string) => {
			return request({
				url: `management/data/area/view/${id}`,
				method: 'get',
			});
		},
		delete: (id: string) => {
			return request({
				url: `management/data/area/delete/${id}`,
				method: 'delete',
			});
		},
		tree: () => {
			return request({
				url: 'management/data/area/tree',
			});
		},
		choiceParent: () => {
			return request({
				url: 'management/data/area/tree?choice=123',
			});
		},
	};
}
